import { defineStore } from 'pinia'
import { ref } from 'vue'

export const pageInfo = defineStore('pageInfo', () => {
	// const pageData: UniApp.GetSystemInfoResult = await initPageData()
	const windowHeight = ref(0)
	const statusBarHeight = ref(0)
	uni.getSystemInfo({
		success: (res) => {
			windowHeight.value = res.windowHeight
			statusBarHeight.value = res.statusBarHeight
		}
	})


	return { windowHeight, statusBarHeight }
})